package com.example.demo.order.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.example.demo.order.dto.request.OrderCreateRequest;
import com.example.demo.order.dto.response.OrderResponse;
import com.example.demo.order.entity.Order;

/**
 * @ClassName OrderService
 * @Description
 * @Author MingChang.Wei
 * @Date 2025/8/8
 **/
public interface OrderService extends IService<Order> {

    OrderResponse createOrder(OrderCreateRequest request);

    boolean payOrder(String orderNo);

    boolean refundOrder(String orderNo);

    OrderResponse getOrder(String orderNo);
    
    Page<OrderResponse> getOrderList(String username, Integer current, Integer size);
    
    /**
     * 根据订单号查询订单
     * @param orderNo 订单号
     * @return 订单信息
     */
    Order getOrderByOrderNo(String orderNo);
}
